import request from '@/utils/request'

// 查询商户列表
export function listBusiness(query) {
  return request({
    url: '/business/business/list',
    method: 'get',
    params: query
  })
}

// 查询商户详细
export function getBusiness(id) {
  return request({
    url: '/business/business/' + id,
    method: 'get'
  })
}

// 查询商户详细
export function getAllCitys() {
  return request({
    url: '/business/business/getAllCitys',
    method: 'get'
  })
}
// 获取验证码
export function getCode(data) {
  return request({
    url: '/business/business/getCode',
    method: 'post',
    data:data
  })
}
// 新增商户
export function addBusiness(data) {
  return request({
    url: '/business/business/add',
    method: 'post',
    data: data
  })
}
export function addBusiness2(data) {
  return request({
    url: '/business/business/addBusiness',
    method: 'post',
    data: data
  })
}

// 修改商户
export function updateBusiness(ids) {
  return request({
    url: '/business/business/update',
    method: 'post',
    data: ids
  })
}
